package com.webex.ta.hydra.gui.wm;

import java.awt.*;
import java.awt.event.FocusEvent;


/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-10-21
 * Time: 9:21:06
 */
public class ToolWindowFocusWatcher extends FocusWatcher {
    private final String id;
    private final InternalDecorator dec;

    public ToolWindowFocusWatcher(InternalDecorator toolWindow) {
        super(toolWindow);
        id = toolWindow.getWindowInfo().getId();
        dec = toolWindow;
    }

    @Override
    protected void focusLostImpl(FocusEvent e) {
//        dec.setActive(false);
    }

    @Override
    protected void focusedComponentChanged(Component component) {
        dec.setActive(true);
    }
}
